package com.juidemo.demo;

import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JFrame;

public class DrawLineDemo extends JFrame {
    public DrawLineDemo() {
        setSize(500, 300);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        setLocationRelativeTo(null);
    }

    public void paint(Graphics g) {
        g.setColor(Color.blue);
        g.drawLine(50, 30, 450, 260);
    }

    public static void main(String[] args) {
        new DrawLineDemo().setVisible(true);
    }
}
